<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title id="title">蒟蒻云内测|</title>
	<link rel="stylesheet" type="text/css" href="../blog/default_markdown.css">	 
	<link rel="icon" href="http://dev.juruoyun.top/data/general/picture/logo.ico" type="image/x-icon">
	<link rel="shortcut icon" href="http://dev.juruoyun.top/data/general/picture/logo.ico" type="image/x-icon">
	<link rel="stylesheet" type="text/css" href="../css/default_general.css">
	<link rel="stylesheet" type="text/css" href="../font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="../css/default_desktop.css">
	<link rel="stylesheet" type="text/css" href="../css/colorpicker.css">
	<meta name="description" content="由李俊彦自己开发的个人站，所有代码都是我自己写的 ">
	<meta name="robots" content="noarchive">
	<script language="javascript" src="../js/all_js.js"></script>
	<script language="javascript" src="../js/md5.js"></script>
	<script language="javascript" src="../js/colorpicker.js"></script>
	<script language="javascript" src="../blog/markdown.js"></script>
</head>
<body style="height:500%">
<div id="body" style="width:100%;height:100%;"></div>
<style>
.jry_wb_window_body
{
	background-color:#5f5f5f;
	border-radius:10px;
	box-shadow:10px 9px 18px #6666;	
}
.jry_wb_window_body .jry_wb_window_top
{
	border-top-left-radius:10px;
	border-top-right-radius:10px;
	background-color:#66ccff;
	width:100%;
	position:absolute;
	top:0px;
	left:0px;
	height:25px;
	text-align:center;
	font-size:20px;
	color:#ffffff;
}
</style>
<script>
	jry_wb_window_buf=null;
	jry_wb_window_last=null;
	const jry_wb_window_normal_zIndex=99;
	const jry_wb_window_active_zIndex=100;
	(function()
	{
		jry_wb_add_onmousemove(function(e)
		{
			if(!e)
				e=window.event;		
			if(jry_wb_window_buf!=null)
				jry_wb_window_buf.run(e);
		});
		jry_wb_add_onmouseup(function()
		{
			if(jry_wb_window_buf!=null)
				jry_wb_window_buf.body.onmouseup();
		});
		jry_wb_add_onscroll(function(e)
		{
			if(!e)
				e=window.event;		
			if(jry_wb_window_buf!=null)
				jry_wb_window_buf.run(e);	
		});
	}())
	function jry_wb_window(area,name)
	{
		this.body=document.createElement('div');area.appendChild(this.body);
		this.body.classList.add('jry_wb_window_body');
		this.body.style.width="500px";this.body.style.height="400px";this.body.style.position="absolute";
		this.setposition(20,40);
		this.flag=false;
		this.body.onmousedown=(e)=>
		{
			if(jry_wb_window_last!=null)
				jry_wb_window_last.body.style.zIndex=jry_wb_window_normal_zIndex
			this.body.style.zIndex=jry_wb_window_active_zIndex;
			if(!e)
				e=window.event;
			this.flag=true;
			if(jry_wb_window_buf!=null)
				jry_wb_window_buf.flag=false;
			jry_wb_window_last=jry_wb_window_buf=this;
			var scrollTop = document.body.scrollTop==0?document.documentElement.scrollTop:document.body.scrollTop;
			var scrollLeft = document.body.scrollLeft==0?document.documentElement.scrollLeft:document.body.scrollLeft;
			this.start={'x':parseInt(this.body.style.left)-e.clientX-scrollLeft,'y':parseInt(this.body.style.top)-e.clientY-scrollTop}
			this.last={'x':e.clientX,'y':e.clientY};
		};
		this.body.onmouseup=()=>
		{
			this.flag=false;
			jry_wb_window_buf=null;
		};
		this.body.onmousemove=(e)=>
		{
			if(!this.flag)
				return;
			if(!e)
				e=window.event;
			this.last={'x':e.clientX,'y':e.clientY};
			this.run(e);
		};
		this.body.onscroll=(e)=>
		{
			if(!this.flag)
				return;
			if(!e)
				e=window.event;
			this.run(e);
		};		
		this.top=document.createElement('div');this.body.appendChild(this.top);
		this.top.classList.add('jry_wb_window_top');
		this.top.innerHTML=name;
	}
	jry_wb_window.prototype.setposition=function(x,y)
	{
		this.body.style.top=x;this.body.style.left=y;
	};
	jry_wb_window.prototype.run=function(e)
	{
		if(e.clientX==undefined)
			e.clientX=this.last.x;e.clientY=this.last.y;
		var scrollTop = document.body.scrollTop==0?document.documentElement.scrollTop:document.body.scrollTop;
		var scrollLeft = document.body.scrollLeft==0?document.documentElement.scrollLeft:document.body.scrollLeft;
		this.setposition(e.clientY+scrollTop+this.start.y,e.clientX+scrollLeft+this.start.x);
	};

var one=new jry_wb_window(document.getElementById('body'),'Test1');
var two=new jry_wb_window(document.getElementById('body'),'Test2');
var three=new jry_wb_window(document.getElementById('body'),'Test3');
</script>
</body>